
package com.joysuch.wwyt.datadump.biz.convertor;

import cn.zlg.common.datadump.annotation.DataDumpField;
import cn.zlg.common.datadump.convertor.FieldValueConvert;
import com.joysuch.wwyt.core.enums.BaseIdCardTypes;
import org.springframework.stereotype.Component;

@Component
public class ImportBaseUserIdCardTypeConvertor implements FieldValueConvert<String, Long> {

    @Override
    public Long convert(Object bean, String value, DataDumpField dataField) {
        Integer index = BaseIdCardTypes.getIndexByName(value);
        return index == null ? null : index.longValue();
    }

}
